package net.sxnic.workflow.task.action;


@SuppressWarnings("serial")
public class TreatTask extends TaskAction {
	
	private String processName;
	
	private String entityId;
	
	private String cancel;

	public String execute() throws Exception {

		task = taskManager.get(taskId);
		processName = task.getProcessName();
		//entityId = task.getEntityId();

		
		//浏览
		if (task.isEnded()) {
			return "view";
		}
		
		if (task.isActived()) {
			return "edit";
		}
		
		return "view";
	}

	public String getProcessName() {
		return processName;
	}

	public void setProcessName(String processName) {
		this.processName = processName;
	}

	public String getEntityId() {
		return entityId;
	}

	public void setEntityId(String entityId) {
		this.entityId = entityId;
	}

	public String getCancel() {
		return cancel;
	}

	public void setCancel(String cancel) {
		this.cancel = cancel;
	}

}
